import { requestInterceptor, responseInterceptor} from "./interceptor";

export const request = (config) => {
  return new Promise((resolve, reject) => {
    uni.request(requestInterceptor(config)).then(res => {
      resolve(responseInterceptor(res));
    }).catch(err => {
      reject(err);
    });
  })
}
